
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreOrderRefundRequest struct {

	StoreOrderId string `json:"store_order_id" form:"store_order_id"`

	StoreId string `json:"store_id" form:"store_id"`

	OrderId string `json:"order_id" form:"order_id"`

	Uid string `json:"uid" form:"uid"`

	RefundType string `json:"refund_type" form:"refund_type"`

	RefundNum string `json:"refund_num" form:"refund_num"`

	RefundPrice string `json:"refund_price" form:"refund_price"`

	RefundedPrice string `json:"refunded_price" form:"refunded_price"`

	RefundPhone string `json:"refund_phone" form:"refund_phone"`

	RefundExpress string `json:"refund_express" form:"refund_express"`

	RefundExpressName string `json:"refund_express_name" form:"refund_express_name"`

	RefundExplain string `json:"refund_explain" form:"refund_explain"`

	RefundImg string `json:"refund_img" form:"refund_img"`

	RefundReason string `json:"refund_reason" form:"refund_reason"`

	RefuseReason string `json:"refuse_reason" form:"refuse_reason"`

	Remark string `json:"remark" form:"remark"`

	RefundedTime string `json:"refunded_time" form:"refunded_time"`

	CartInfo string `json:"cart_info" form:"cart_info"`

	IsCancel string `json:"is_cancel" form:"is_cancel"`

	IsPinkCancel string `json:"is_pink_cancel" form:"is_pink_cancel"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

	IsSystemDel string `json:"is_system_del" form:"is_system_del"`

}

func (r *StoreOrderRefundRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreOrderRefundRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"store_order_id": "required",

		"store_id": "required",

		"order_id": "required",

		"uid": "required",

		"refund_type": "required",

		"refund_num": "required",

		"refund_price": "required",

		"refunded_price": "required",

		"refund_phone": "required",

		"refund_express": "required",

		"refund_express_name": "required",

		"refund_explain": "required",

		"refund_img": "required",

		"refund_reason": "required",

		"refuse_reason": "required",

		"remark": "required",

		"refunded_time": "required",

		"cart_info": "required",

		"is_cancel": "required",

		"is_pink_cancel": "required",

		"is_del": "required",

		"add_time": "required",

		"is_system_del": "required",

	}
}

func (r *StoreOrderRefundRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderRefundRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderRefundRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
